package com.guigu.www.mapper;

import com.guigu.www.pojo.BespeakSetMeal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author DengHao
 * @since 2021-10-21
 */
public interface BespeakSetMealMapper extends BaseMapper<BespeakSetMeal> {
    /*陈显科   根据会员id查询自己订购的套餐*/
    @Select("SELECT * FROM bespeak_set_meal WHERE bes_sm_id IN(\n" +
            "SELECT bes_sm_id FROM bespeak WHERE mem_id IN(\n" +
            "SELECT mem_id FROM member WHERE mem_id=#{sid}))")
    List<BespeakSetMeal> SelectByIdBespeak(int sid);
}
